package com.rawchen.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.rawchen.entity.Moment;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

/**
 * @Description: 博客动态持久层接口
 */
@Mapper
@Repository
public interface MomentMapper extends BaseMapper<Moment> {
	/**
	 * 给动态点赞
	 *
	 * @param momentId 动态ID
	 */
	int addLikeByMomentId(Long momentId);

	/**
	 * 更新动态发布状态
	 *
	 * @param momentId  动态ID
	 * @param published 是否公开
	 */
	int updateMomentPublishedById(Long momentId, Boolean published);
}
